home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c++ / 1151 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  2.7 KB

  1. Path: engnews1.Eng.Sun.COM!taumet!clamage
  2. From: sjc@netcom.com (Steven Correll)
  3. Newsgroups: comp.std.c++
  4. Subject: Re: references and ellipsis
  5. Date: 18 Apr 1996 15:02:22 GMT
  6. Organization: NETCOM On-line Communication Services (408 261-4700 guest)
  7. Approved: clamage@eng.sun.com (comp.std.c++)
  8. Message-ID: <sjcDq1o6J.9zC@netcom.com>
  9. References: <4kop8j$ino@vishnu.jussieu.fr> <4kr1p3$67g@mulga.cs.mu.OZ.AU> <KANZE.96Apr15211326@slsvgqt.lts.sel.alcatel.de> <4kvnid$rg5@mulga.cs.mu.oz.au>
  10. NNTP-Posting-Host: taumet.eng.sun.com
  11. Apparently-To: comp-std-c++@uunet.uu.net
  12. Content-Length: 1748
  13. X-Lines: 29
  14. Originator: clamage@taumet
  15.  
  16. >>|> clamage@Eng.Sun.COM (Steve Clamage) writes:
  17. >>|> >According the draft standard, the results of using a reference
  18. >>|> >type as the last pararmeter before the ellipsis (...) are
  19. >>|> >undefined. See section 18.7 "Other runtime support" [lib.support.runtime].
  20.  
  21. Here we have a case where the user is relies on "undefined" behavior; the
  22. user can easily fix the program not to do this; every compiler can detect it;
  23. and some but not all compilers will generate surprising and undesirable
  24. behavior.
  25.  
  26. In such circumstances, should the language standard require every
  27. compiler to generate a diagnostic? I say yes, but I admit it's a matter
  28. of taste. Those who disagree should note, however, that both C and
  29. Fortran have a history of having to change a lot of their "no" answers
  30. to "yes" answers the second time around: both ANSI C and Fortran 90 are
  31. far stricter than their predecessors, because experienced programmers
  32. seem to prefer to maximize the probability that their code will work
  33. when ported to another place, rather than to take advantage of the
  34. possibility that a few implementations might do something handy for the
  35. "undefined" cases. In the case of Fortran 90, some of the pressure for
  36. stricter diagnostics even came from implementors who were sick of
  37. having to provide a "VMS" switch to implement undefined things the way
  38. the Vax did, a "Cray" switch to implement undefined things the way the
  39. Cray did, etc, so as to keep their users content. Members of the
  40. committee should realize that in many cases, if the de jure standard
  41. says "undefined" and doesn't require a diagnostic, the de facto
  42. standard will be "implementors have to do whatever Microsoft does".
  43. -- 
  44. Steven Correll == PO Box 66625, Scotts Valley, CA 95067 == sjc@netcom.com
  45.  
  46.  
  47. [ comp.std.c++ is moderated.  To submit articles: try just posting with      ]
  48. [ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu         ]
  49. [ FAQ:      http://reality.sgi.com/employees/austern_mti/std-c++/faq.html    ]
  50. [ Policy:   http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
  51. [ Comments? mailto:std-c++-request@ncar.ucar.edu                             ]
  52.